<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
  <title>添加地址</title>
  <!-- Bootstrap 5 CSS -->
  <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/css/bootstrap.min.css" rel="stylesheet">
  <!-- Font Awesome -->
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css">
  
  <style>
    :root {
      --primary: #4F46E5;
      --secondary: #6B7280;
      --light: #F9FAFB;
      --dark: #1F2937;
      --white: #FFFFFF;
      --border: #E5E7EB;
      --shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
      --success: #10B981;
      --danger: #EF4444;
      
      /* 不同风格主题色 */
      --style1: #3B82F6; /* 科技蓝 */
      --style2: #EC4899; /* 活力粉 */
      --style3: #10B981; /* 生态绿 */
      --style4: #F59E0B; /* 温暖橙 */
      --style5: #8B5CF6; /* 梦幻紫 */
      --style6: #111827; /* 商务黑 */
    }
    
    body {
      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
      background-color: #f5f5f5;
      color: var(--dark);
      min-height: 100vh;
      padding: 0;
      margin: 0;
      transition: background-color 0.3s ease;
    }
    
    .container {
      max-width: 420px;
      margin: 0 auto;
      background-color: var(--white);
      min-height: 100vh;
      box-shadow: var(--shadow);
      overflow: hidden;
      position: relative;
      transition: background-color 0.3s ease;
    }
    
    /* 主页面容器 */
    .address-page {
      display: none;
      min-height: 100vh;
      flex-direction: column;
    }
    
    .address-page.active {
      display: flex;
      animation: fadeIn 0.3s ease forwards;
    }
    
    /* 顶部导航栏 */
    .page-header {
      padding: 18px 20px;
      position: relative;
      text-align: center;
      border-bottom: 1px solid var(--border);
      background-color: var(--white);
      transition: all 0.3s ease;
      z-index: 10;
    }
    
    .page-title {
      font-size: 18px;
      font-weight: 600;
      margin: 0;
    }
    
    .header-back {
      position: absolute;
      left: 20px;
      top: 50%;
      transform: translateY(-50%);
      background: none;
      border: none;
      color: var(--dark);
      font-size: 20px;
      cursor: pointer;
      transition: color 0.3s ease, transform 0.2s ease;
    }
    
    .header-back:active {
      transform: translateY(-50%) scale(0.9);
    }
    
    .header-actions {
      position: absolute;
      right: 20px;
      top: 50%;
      transform: translateY(-50%);
    }
    
    .header-btn {
      background: none;
      border: none;
      color: var(--dark);
      font-size: 16px;
      cursor: pointer;
      padding: 5px 10px;
      font-weight: 500;
      transition: all 0.2s ease;
    }
    
    .header-btn:active {
      transform: scale(0.95);
    }
    
    /* 表单区域 */
    .form-container {
      flex-grow: 1;
      padding: 20px;
      overflow-y: auto;
      background-color: var(--light);
      transition: background-color 0.3s ease;
    }
    
    .form-group {
      margin-bottom: 18px;
    }
    
    .form-label {
      display: block;
      margin-bottom: 8px;
      font-size: 14px;
      font-weight: 500;
      color: var(--dark);
    }
    
    .form-control {
      width: 100%;
      padding: 12px 15px;
      border: 1px solid var(--border);
      border-radius: 8px;
      font-size: 15px;
      transition: all 0.2s ease;
      background-color: var(--white);
      color: var(--dark);
    }
    
    .form-control:focus {
      outline: none;
      border-color: var(--primary);
      box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.1);
    }
    
    .form-hint {
      font-size: 12px;
      color: var(--secondary);
      margin-top: 5px;
    }
    
    .form-row {
      display: flex;
      gap: 10px;
    }
    
    .form-row .form-group {
      flex: 1;
      margin-bottom: 18px;
    }
    
    /* 地址列表 */
    .address-list {
      margin-top: 10px;
    }
    
    .address-item {
      background-color: var(--white);
      border-radius: 10px;
      padding: 15px;
      margin-bottom: 10px;
      border: 1px solid var(--border);
      position: relative;
    }
    
    .address-name {
      font-weight: 600;
      margin-bottom: 5px;
      display: flex;
      justify-content: space-between;
    }
    
    .address-phone {
      color: var(--secondary);
      font-size: 14px;
      margin-bottom: 8px;
    }
    
    .address-detail {
      font-size: 14px;
      line-height: 1.4;
    }
    
    .address-actions {
      position: absolute;
      right: 15px;
      top: 15px;
      display: flex;
      gap: 10px;
    }
    
    .address-action-btn {
      background: none;
      border: none;
      color: var(--secondary);
      font-size: 14px;
      cursor: pointer;
      transition: color 0.2s ease;
    }
    
    .address-action-btn:hover {
      color: var(--primary);
    }
    
    .default-tag {
      background-color: var(--primary);
      color: white;
      font-size: 12px;
      padding: 2px 8px;
      border-radius: 4px;
      margin-left: 8px;
    }
    
    /* 底部操作栏 */
    .action-bar {
      padding: 15px 20px;
      border-top: 1px solid var(--border);
      background-color: var(--white);
    }
    
    .save-btn {
      width: 100%;
      background-color: var(--primary);
      color: white;
      border: none;
      border-radius: 8px;
      padding: 12px;
      font-size: 16px;
      font-weight: 500;
      cursor: pointer;
      transition: all 0.2s ease;
      box-shadow: 0 2px 8px rgba(79, 70, 229, 0.2);
    }
    
    .save-btn:active {
      transform: scale(0.98);
      box-shadow: 0 1px 4px rgba(79, 70, 229, 0.2);
    }
    
    .save-btn:disabled {
      background-color: var(--secondary);
      cursor: not-allowed;
      box-shadow: none;
    }
    
    /* 添加新地址按钮 */
    .add-address-btn {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      width: 100%;
      background-color: var(--white);
      color: var(--primary);
      border: 1px dashed var(--primary);
      border-radius: 8px;
      padding: 12px;
      font-size: 16px;
      font-weight: 500;
      cursor: pointer;
      transition: all 0.2s ease;
      margin-bottom: 15px;
    }
    
    .add-address-btn:hover {
      background-color: rgba(79, 70, 229, 0.05);
    }
    
    /* 样式切换器 */
    .style-switcher {
      position: fixed;
      top: 20px;
      right: 20px;
      z-index: 1010;
      background-color: white;
      border-radius: 8px;
      box-shadow: var(--shadow);
      overflow: hidden;
      width: 180px;
      transition: all 0.3s ease;
      transform: translateX(0);
      opacity: 1;
    }
    
    .style-switcher.hidden {
      transform: translateX(200px);
      opacity: 0;
      pointer-events: none;
    }
    
    .switcher-toggle {
      position: fixed;
      top: 20px;
      right: 20px;
      z-index: 1020;
      width: 40px;
      height: 40px;
      border-radius: 50%;
      background-color: var(--primary);
      color: white;
      display: flex;
      align-items: center;
      justify-content: center;
      box-shadow: var(--shadow);
      border: none;
      font-size: 18px;
      cursor: pointer;
      transition: all 0.3s ease;
    }
    
    .switcher-header {
      padding: 10px 16px;
      font-size: 14px;
      font-weight: 600;
      border-bottom: 1px solid #eee;
      display: flex;
      justify-content: space-between;
      align-items: center;
    }
    
    .switcher-close {
      background: none;
      border: none;
      color: var(--secondary);
      font-size: 16px;
      cursor: pointer;
    }
    
    .switcher-option {
      padding: 12px 16px;
      font-size: 14px;
      cursor: pointer;
      transition: background-color 0.2s;
      display: flex;
      align-items: center;
    }
    
    .switcher-color {
      width: 12px;
      height: 12px;
      border-radius: 50%;
      margin-right: 10px;
    }
    
    .switcher-option:hover {
      background-color: #f9f9f9;
    }
    
    .switcher-option.active {
      background-color: var(--primary);
      color: white;
    }
    
    /* 风格1：科技蓝 */
    .style-1 {
      --primary: var(--style1);
    }
    
    .style-1 .form-control:focus {
      box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
    }
    
    .style-1 .save-btn {
      box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
    }
    
    /* 风格2：活力粉 */
    .style-2 {
      --primary: var(--style2);
    }
    
    .style-2 .page-header {
      background: linear-gradient(45deg, var(--primary), #F472B6);
      color: white;
      border-bottom: none;
      box-shadow: 0 2px 15px rgba(236, 72, 153, 0.2);
    }
    
    .style-2 .header-back,
    .style-2 .header-btn,
    .style-2 .page-title {
      color: white;
    }
    
    .style-2 .form-container {
      background-color: #FAFAFA;
    }
    
    .style-2 .address-item {
      border-radius: 15px;
      box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
      border: none;
    }
    
    .style-2 .save-btn {
      border-radius: 25px;
      box-shadow: 0 4px 15px rgba(236, 72, 153, 0.2);
    }
    
    /* 风格3：生态绿 */
    .style-3 {
      --primary: var(--style3);
    }
    
    .style-3 .container {
      background-color: #F8FAFC;
    }
    
    .style-3 .form-control {
      border-radius: 6px;
      border: 1px solid rgba(16, 185, 129, 0.1);
    }
    
    .style-3 .form-container {
      background-color: #F0FDF4;
    }
    
    .style-3 .address-item {
      background-color: white;
      border-left: 3px solid var(--primary);
    }
    
    /* 风格4：温暖橙 */
    .style-4 {
      --primary: var(--style4);
    }
    
    .style-4 .page-header {
      background-color: white;
      border-bottom: none;
      box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    }
    
    .style-4 .form-control {
      border-radius: 10px;
    }
    
    .style-4 .form-label {
      color: var(--primary);
    }
    
    .style-4 .save-btn {
      background: linear-gradient(90deg, var(--primary), #FBBF24);
      box-shadow: 0 3px 10px rgba(245, 158, 11, 0.2);
    }
    
    /* 风格5：梦幻紫 */
    .style-5 {
      --primary: var(--style5);
    }
    
    .style-5 .container {
      background-color: #FCFAFF;
    }
    
    .style-5 .form-container {
      background-color: #F9FAFF;
    }
    
    .style-5 .form-control {
      border-radius: 12px;
      border: 1px solid rgba(139, 92, 246, 0.1);
    }
    
    .style-5 .address-item {
      border-radius: 12px;
      border: 1px solid rgba(139, 92, 246, 0.1);
    }
    
    .style-5 .save-btn {
      border-radius: 12px;
      box-shadow: 0 4px 15px rgba(139, 92, 246, 0.2);
    }
    
    /* 风格6：商务黑 */
    .style-6 {
      --primary: #60A5FA;
      --secondary: #9CA3AF;
      --light: #1F2937;
      --dark: #F9FAFB;
      --white: #111827;
      --border: #374151;
      --shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    }
    
    .style-6 body {
      background-color: #030712;
    }
    
    .style-6 .container {
      background-color: var(--white);
    }
    
    .style-6 .page-header {
      background-color: var(--light);
      border-bottom-color: var(--border);
    }
    
    .style-6 .header-back,
    .style-6 .header-btn,
    .style-6 .page-title {
      color: var(--dark);
    }
    
    .style-6 .form-control {
      background-color: var(--light);
      border-color: var(--border);
      color: var(--dark);
    }
    
    .style-6 .address-item {
      background-color: var(--light);
      border-color: var(--border);
    }
    
    .style-6 .address-name,
    .style-6 .address-detail {
      color: #E5E7EB;
    }
    
    .style-6 .style-switcher {
      background-color: var(--light);
    }
    
    .style-6 .switcher-header {
      border-bottom-color: var(--border);
      color: var(--dark);
    }
    
    .style-6 .switcher-option {
      color: var(--dark);
    }
    
    .style-6 .switcher-option:hover {
      background-color: rgba(255, 255, 255, 0.1);
    }
    
    /* 动画效果 */
    @keyframes fadeIn {
      from { opacity: 0; transform: translateY(10px); }
      to { opacity: 1; transform: translateY(0); }
    }
    
    /* 响应式调整 */
    @media (max-width: 360px) {
      .form-container {
        padding: 15px;
      }
      
      .form-row {
        flex-direction: column;
        gap: 0;
      }
    }
  </style>
</head>
<body class="style-1">
  <!-- 样式切换器 -->
  <button class="switcher-toggle">
    <i class="fa fa-paint-brush"></i>
  </button>
  
  <div class="style-switcher hidden">
    <div class="switcher-header">
      选择地址页面样式
      <button class="switcher-close"><i class="fa fa-times"></i></button>
    </div>
    <div class="switcher-option active" data-style="1">
      <span class="switcher-color" style="background-color: var(--style1);"></span>
      科技蓝
    </div>
    <div class="switcher-option" data-style="2">
      <span class="switcher-color" style="background-color: var(--style2);"></span>
      活力粉
    </div>
    <div class="switcher-option" data-style="3">
      <span class="switcher-color" style="background-color: var(--style3);"></span>
      生态绿
    </div>
    <div class="switcher-option" data-style="4">
      <span class="switcher-color" style="background-color: var(--style4);"></span>
      温暖橙
    </div>
    <div class="switcher-option" data-style="5">
      <span class="switcher-color" style="background-color: var(--style5);"></span>
      梦幻紫
    </div>
    <div class="switcher-option" data-style="6">
      <span class="switcher-color" style="background-color: var(--style6);"></span>
      商务黑
    </div>
  </div>
  
  <div class="container">
    <!-- 风格1：科技蓝 -->
    <div class="address-page active" id="page1">
      <div class="page-header">
        <button class="header-back"><i class="fa fa-arrow-left"></i></button>
        <h1 class="page-title">添加收货地址</h1>
        <div class="header-actions">
          <button class="header-btn">管理</button>
        </div>
      </div>
      
      <div class="form-container">
        <div class="address-list">
          <div class="address-item">
            <div class="address-name">
              张先生 <span class="default-tag">默认</span>
            </div>
            <div class="address-phone">138****5678</div>
            <div class="address-detail">北京市朝阳区建国路88号现代城SOHO B座2307室 邮编:100022</div>
            <div class="address-actions">
              <button class="address-action-btn"><i class="fa fa-pencil"></i></button>
              <button class="address-action-btn"><i class="fa fa-trash"></i></button>
            </div>
          </div>
          
          <div class="address-item">
            <div class="address-name">
              张先生
            </div>
            <div class="address-phone">138****5678</div>
            <div class="address-detail">上海市浦东新区张江高科技园区博云路2号浦软大厦10层 邮编:201203</div>
            <div class="address-actions">
              <button class="address-action-btn"><i class="fa fa-pencil"></i></button>
              <button class="address-action-btn"><i class="fa fa-trash"></i></button>
            </div>
          </div>
        </div>
        
        <button class="add-address-btn" id="addBtn1">
          <i class="fa fa-plus"></i> 添加新地址
        </button>
        
        <form id="addressForm1" style="display: none;">
          <div class="form-group">
            <label class="form-label" for="name1">收件人</label>
            <input type="text" class="form-control" id="name1" placeholder="请输入收件人姓名">
          </div>
          
          <div class="form-group">
            <label class="form-label" for="phone1">手机号码</label>
            <input type="tel" class="form-control" id="phone1" placeholder="请输入手机号码">
            <div class="form-hint">请输入正确的手机号码，以便接收配送通知</div>
          </div>
          
          <div class="form-group">
            <label class="form-label">所在地区</label>
            <div class="form-row">
              <div class="form-group">
                <select class="form-control" id="province1">
                  <option value="">请选择省份</option>
                  <option value="beijing">北京市</option>
                  <option value="shanghai">上海市</option>
                  <option value="guangdong">广东省</option>
                </select>
              </div>
              <div class="form-group">
                <select class="form-control" id="city1">
                  <option value="">请选择城市</option>
                </select>
              </div>
              <div class="form-group">
                <select class="form-control" id="district1">
                  <option value="">请选择区/县</option>
                </select>
              </div>
            </div>
          </div>
          
          <div class="form-group">
            <label class="form-label" for="detail1">详细地址</label>
            <textarea class="form-control" id="detail1" rows="3" placeholder="请输入详细地址，如街道、门牌号等"></textarea>
          </div>
          
          <div class="form-group">
            <label class="form-label" for="zipcode1">邮政编码</label>
            <input type="text" class="form-control" id="zipcode1" placeholder="请输入邮政编码（选填）">
          </div>
          
          <div class="form-group">
            <label class="form-check-label">
              <input type="checkbox" id="default1"> 设为默认地址
            </label>
          </div>
        </form>
      </div>
      
      <div class="action-bar">
        <button class="save-btn" id="saveBtn1" disabled>保存地址</button>
      </div>
    </div>
    
    <!-- 风格2：活力粉 -->
    <div class="address-page" id="page2">
      <div class="page-header">
        <button class="header-back"><i class="fa fa-arrow-left"></i></button>
        <h1 class="page-title">添加收货地址</h1>
        <div class="header-actions">
          <button class="header-btn">管理</button>
        </div>
      </div>
      
      <div class="form-container">
        <div class="address-list">
          <div class="address-item">
            <div class="address-name">
              李小姐 <span class="default-tag">默认</span>
            </div>
            <div class="address-phone">139****2345</div>
            <div class="address-detail">广州市天河区珠江新城花城大道85号高德置地广场A座1503室 邮编:510623</div>
            <div class="address-actions">
              <button class="address-action-btn"><i class="fa fa-pencil"></i></button>
              <button class="address-action-btn"><i class="fa fa-trash"></i></button>
            </div>
          </div>
        </div>
        
        <button class="add-address-btn" id="addBtn2">
          <i class="fa fa-plus"></i> 添加新地址
        </button>
        
        <form id="addressForm2" style="display: none;">
          <div class="form-group">
            <label class="form-label" for="name2">收件人</label>
            <input type="text" class="form-control" id="name2" placeholder="请输入收件人姓名">
          </div>
          
          <div class="form-group">
            <label class="form-label" for="phone2">手机号码</label>
            <input type="tel" class="form-control" id="phone2" placeholder="请输入手机号码">
          </div>
          
          <div class="form-group">
            <label class="form-label">所在地区</label>
            <div class="form-row">
              <div class="form-group">
                <select class="form-control" id="province2">
                  <option value="">请选择省份</option>
                  <option value="beijing">北京市</option>
                  <option value="shanghai">上海市</option>
                  <option value="guangdong">广东省</option>
                </select>
              </div>
              <div class="form-group">
                <select class="form-control" id="city2">
                  <option value="">请选择城市</option>
                </select>
              </div>
              <div class="form-group">
                <select class="form-control" id="district2">
                  <option value="">请选择区/县</option>
                </select>
              </div>
            </div>
          </div>
          
          <div class="form-group">
            <label class="form-label" for="detail2">详细地址</label>
            <textarea class="form-control" id="detail2" rows="3" placeholder="请输入详细地址"></textarea>
          </div>
          
          <div class="form-group">
            <label class="form-check-label">
              <input type="checkbox" id="default2"> 设为默认地址
            </label>
          </div>
        </form>
      </div>
      
      <div class="action-bar">
        <button class="save-btn" id="saveBtn2" disabled>保存地址</button>
      </div>
    </div>
    
    <!-- 风格3：生态绿 -->
    <div class="address-page" id="page3">
      <div class="page-header">
        <button class="header-back"><i class="fa fa-arrow-left"></i></button>
        <h1 class="page-title">添加收货地址</h1>
        <div class="header-actions">
          <button class="header-btn">管理</button>
        </div>
      </div>
      
      <div class="form-container">
        <div class="address-list">
          <div class="address-item">
            <div class="address-name">
              王建国 <span class="default-tag">默认</span>
            </div>
            <div class="address-phone">135****6789</div>
            <div class="address-detail">杭州市西湖区文三路90号东部软件园科技大厦12层 邮编:310012</div>
            <div class="address-actions">
              <button class="address-action-btn"><i class="fa fa-pencil"></i></button>
              <button class="address-action-btn"><i class="fa fa-trash"></i></button>
            </div>
          </div>
        </div>
        
        <button class="add-address-btn" id="addBtn3">
          <i class="fa fa-plus"></i> 添加新地址
        </button>
        
        <form id="addressForm3" style="display: none;">
          <div class="form-group">
            <label class="form-label" for="name3">收件人</label>
            <input type="text" class="form-control" id="name3" placeholder="请输入收件人姓名">
          </div>
          
          <div class="form-group">
            <label class="form-label" for="phone3">手机号码</label>
            <input type="tel" class="form-control" id="phone3" placeholder="请输入手机号码">
          </div>
          
          <div class="form-group">
            <label class="form-label">所在地区</label>
            <div class="form-row">
              <div class="form-group">
                <select class="form-control" id="province3">
                  <option value="">请选择省份</option>
                  <option value="beijing">北京市</option>
                  <option value="shanghai">上海市</option>
                  <option value="zhejiang">浙江省</option>
                </select>
              </div>
              <div class="form-group">
                <select class="form-control" id="city3">
                  <option value="">请选择城市</option>
                </select>
              </div>
              <div class="form-group">
                <select class="form-control" id="district3">
                  <option value="">请选择区/县</option>
                </select>
              </div>
            </div>
          </div>
          
          <div class="form-group">
            <label class="form-label" for="detail3">详细地址</label>
            <textarea class="form-control" id="detail3" rows="3" placeholder="请输入详细地址"></textarea>
          </div>
          
          <div class="form-group">
            <label class="form-check-label">
              <input type="checkbox" id="default3"> 设为默认地址
            </label>
          </div>
        </form>
      </div>
      
      <div class="action-bar">
        <button class="save-btn" id="saveBtn3" disabled>保存地址</button>
      </div>
    </div>
    
    <!-- 风格4：温暖橙 -->
    <div class="address-page" id="page4">
      <div class="page-header">
        <button class="header-back"><i class="fa fa-arrow-left"></i></button>
        <h1 class="page-title">添加收货地址</h1>
        <div class="header-actions">
          <button class="header-btn">管理</button>
        </div>
      </div>
      
      <div class="form-container">
        <div class="address-list">
          <div class="address-item">
            <div class="address-name">
              赵大厨 <span class="default-tag">默认</span>
            </div>
            <div class="address-phone">136****8901</div>
            <div class="address-detail">成都市锦江区红星路三段1号IFS国际金融中心2号楼30层 邮编:610017</div>
            <div class="address-actions">
              <button class="address-action-btn"><i class="fa fa-pencil"></i></button>
              <button class="address-action-btn"><i class="fa fa-trash"></i></button>
            </div>
          </div>
        </div>
        
        <button class="add-address-btn" id="addBtn4">
          <i class="fa fa-plus"></i> 添加新地址
        </button>
        
        <form id="addressForm4" style="display: none;">
          <div class="form-group">
            <label class="form-label" for="name4">收件人</label>
            <input type="text" class="form-control" id="name4" placeholder="请输入收件人姓名">
          </div>
          
          <div class="form-group">
            <label class="form-label" for="phone4">手机号码</label>
            <input type="tel" class="form-control" id="phone4" placeholder="请输入手机号码">
          </div>
          
          <div class="form-group">
            <label class="form-label">所在地区</label>
            <div class="form-row">
              <div class="form-group">
                <select class="form-control" id="province4">
                  <option value="">请选择省份</option>
                  <option value="sichuan">四川省</option>
                  <option value="guangdong">广东省</option>
                  <option value="shaanxi">陕西省</option>
                </select>
              </div>
              <div class="form-group">
                <select class="form-control" id="city4">
                  <option value="">请选择城市</option>
                </select>
              </div>
              <div class="form-group">
                <select class="form-control" id="district4">
                  <option value="">请选择区/县</option>
                </select>
              </div>
            </div>
          </div>
          
          <div class="form-group">
            <label class="form-label" for="detail4">详细地址</label>
            <textarea class="form-control" id="detail4" rows="3" placeholder="请输入详细地址"></textarea>
          </div>
          
          <div class="form-group">
            <label class="form-check-label">
              <input type="checkbox" id="default4"> 设为默认地址
            </label>
          </div>
        </form>
      </div>
      
      <div class="action-bar">
        <button class="save-btn" id="saveBtn4" disabled>保存地址</button>
      </div>
    </div>
    
    <!-- 风格5：梦幻紫 -->
    <div class="address-page" id="page5">
      <div class="page-header">
        <button class="header-back"><i class="fa fa-arrow-left"></i></button>
        <h1 class="page-title">添加收货地址</h1>
        <div class="header-actions">
          <button class="header-btn">管理</button>
        </div>
      </div>
      
      <div class="form-container">
        <div class="address-list">
          <div class="address-item">
            <div class="address-name">
              吴艺 <span class="default-tag">默认</span>
            </div>
            <div class="address-phone">137****9012</div>
            <div class="address-detail">南京市玄武区中山路18号德基广场2期15层 邮编:210005</div>
            <div class="address-actions">
              <button class="address-action-btn"><i class="fa fa-pencil"></i></button>
              <button class="address-action-btn"><i class="fa fa-trash"></i></button>
            </div>
          </div>
        </div>
        
        <button class="add-address-btn" id="addBtn5">
          <i class="fa fa-plus"></i> 添加新地址
        </button>
        
        <form id="addressForm5" style="display: none;">
          <div class="form-group">
            <label class="form-label" for="name5">收件人</label>
            <input type="text" class="form-control" id="name5" placeholder="请输入收件人姓名">
          </div>
          
          <div class="form-group">
            <label class="form-label" for="phone5">手机号码</label>
            <input type="tel" class="form-control" id="phone5" placeholder="请输入手机号码">
          </div>
          
          <div class="form-group">
            <label class="form-label">所在地区</label>
            <div class="form-row">
              <div class="form-group">
                <select class="form-control" id="province5">
                  <option value="">请选择省份</option>
                  <option value="jiangsu">江苏省</option>
                  <option value="zhejiang">浙江省</option>
                  <option value="shandong">山东省</option>
                </select>
              </div>
              <div class="form-group">
                <select class="form-control" id="city5">
                  <option value="">请选择城市</option>
                </select>
              </div>
              <div class="form-group">
                <select class="form-control" id="district5">
                  <option value="">请选择区/县</option>
                </select>
              </div>
            </div>
          </div>
          
          <div class="form-group">
            <label class="form-label" for="detail5">详细地址</label>
            <textarea class="form-control" id="detail5" rows="3" placeholder="请输入详细地址"></textarea>
          </div>
          
          <div class="form-group">
            <label class="form-check-label">
              <input type="checkbox" id="default5"> 设为默认地址
            </label>
          </div>
        </form>
      </div>
      
      <div class="action-bar">
        <button class="save-btn" id="saveBtn5" disabled>保存地址</button>
      </div>
    </div>
    
    <!-- 风格6：商务黑 -->
    <div class="address-page" id="page6">
      <div class="page-header">
        <button class="header-back"><i class="fa fa-arrow-left"></i></button>
        <h1 class="page-title">添加收货地址</h1>
        <div class="header-actions">
          <button class="header-btn">管理</button>
        </div>
      </div>
      
      <div class="form-container">
        <div class="address-list">
          <div class="address-item">
            <div class="address-name">
              张总 <span class="default-tag">默认</span>
            </div>
            <div class="address-phone">133****2345</div>
            <div class="address-detail">深圳市南山区科技园南区科苑南路1号中国储能大厦35层 邮编:518057</div>
            <div class="address-actions">
              <button class="address-action-btn"><i class="fa fa-pencil"></i></button>
              <button class="address-action-btn"><i class="fa fa-trash"></i></button>
            </div>
          </div>
        </div>
        
        <button class="add-address-btn" id="addBtn6">
          <i class="fa fa-plus"></i> 添加新地址
        </button>
        
        <form id="addressForm6" style="display: none;">
          <div class="form-group">
            <label class="form-label" for="name6">收件人</label>
            <input type="text" class="form-control" id="name6" placeholder="请输入收件人姓名">
          </div>
          
          <div class="form-group">
            <label class="form-label" for="phone6">手机号码</label>
            <input type="tel" class="form-control" id="phone6" placeholder="请输入手机号码">
          </div>
          
          <div class="form-group">
            <label class="form-label">所在地区</label>
            <div class="form-row">
              <div class="form-group">
                <select class="form-control" id="province6">
                  <option value="">请选择省份</option>
                  <option value="guangdong">广东省</option>
                  <option value="jiangsu">江苏省</option>
                  <option value="beijing">北京市</option>
                </select>
              </div>
              <div class="form-group">
                <select class="form-control" id="city6">
                  <option value="">请选择城市</option>
                </select>
              </div>
              <div class="form-group">
                <select class="form-control" id="district6">
                  <option value="">请选择区/县</option>
                </select>
              </div>
            </div>
          </div>
          
          <div class="form-group">
            <label class="form-label" for="detail6">详细地址</label>
            <textarea class="form-control" id="detail6" rows="3" placeholder="请输入详细地址"></textarea>
          </div>
          
          <div class="form-group">
            <label class="form-check-label">
              <input type="checkbox" id="default6"> 设为默认地址
            </label>
          </div>
        </form>
      </div>
      
      <div class="action-bar">
        <button class="save-btn" id="saveBtn6" disabled>保存地址</button>
      </div>
    </div>
  </div>
  
  <!-- Bootstrap JS -->
  <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
  
  <script>
    // 当前状态
    let currentStyle = 1;
    
    // 地区数据
    const areaData = {
      beijing: {
        cities: {
          beijing: {
            name: "北京市",
            districts: ["东城区", "西城区", "朝阳区", "丰台区", "石景山区", "海淀区", "顺义区"]
          }
        }
      },
      shanghai: {
        cities: {
          shanghai: {
            name: "上海市",
            districts: ["黄浦区", "徐汇区", "长宁区", "静安区", "普陀区", "虹口区", "杨浦区"]
          }
        }
      },
      guangdong: {
        cities: {
          guangzhou: {
            name: "广州市",
            districts: ["越秀区", "海珠区", "荔湾区", "天河区", "白云区", "黄埔区", "番禺区"]
          },
          shenzhen: {
            name: "深圳市",
            districts: ["福田区", "罗湖区", "南山区", "宝安区", "龙岗区", "盐田区"]
          }
        }
      },
      zhejiang: {
        cities: {
          hangzhou: {
            name: "杭州市",
            districts: ["上城区", "下城区", "江干区", "拱墅区", "西湖区", "滨江区"]
          },
          ningbo: {
            name: "宁波市",
            districts: ["海曙区", "江东区", "江北区", "北仑区", "镇海区", "鄞州区"]
          }
        }
      },
      jiangsu: {
        cities: {
          nanjing: {
            name: "南京市",
            districts: ["玄武区", "白下区", "秦淮区", "建邺区", "鼓楼区", "下关区"]
          },
          suzhou: {
            name: "苏州市",
            districts: ["姑苏区", "虎丘区", "吴中区", "相城区", "吴江区", "工业园区"]
          }
        }
      }
    };
    
    // DOM元素
    const switcherToggle = document.querySelector('.switcher-toggle');
    const switcher = document.querySelector('.style-switcher');
    const switcherClose = document.querySelector('.switcher-close');
    const switcherOptions = document.querySelectorAll('.switcher-option');
    const addressPages = {
      1: document.getElementById('page1'),
      2: document.getElementById('page2'),
      3: document.getElementById('page3'),
      4: document.getElementById('page4'),
      5: document.getElementById('page5'),
      6: document.getElementById('page6')
    };
    const bodyElement = document.body;
    
    // 初始化
    function init() {
      // 切换器控制
      switcherToggle.addEventListener('click', toggleSwitcher);
      switcherClose.addEventListener('click', toggleSwitcher);
      
      // 切换样式
      switcherOptions.forEach(option => {
        option.addEventListener('click', function() {
          const style = parseInt(this.getAttribute('data-style'));
          switchStyle(style);
          toggleSwitcher();
        });
      });
      
      // 初始化所有页面的交互
      initPageInteractions();
    }
    
    // 初始化页面交互
    function initPageInteractions() {
      // 为每个页面初始化交互
      for (let i = 1; i <= 6; i++) {
        const page = addressPages[i];
        const form = document.getElementById(`addressForm${i}`);
        const addBtn = document.getElementById(`addBtn${i}`);
        const saveBtn = document.getElementById(`saveBtn${i}`);
        const nameInput = document.getElementById(`name${i}`);
        const phoneInput = document.getElementById(`phone${i}`);
        const detailInput = document.getElementById(`detail${i}`);
        const provinceSelect = document.getElementById(`province${i}`);
        const citySelect = document.getElementById(`city${i}`);
        const districtSelect = document.getElementById(`district${i}`);
        
        // 添加新地址按钮
        addBtn.addEventListener('click', function() {
          form.style.display = form.style.display === 'none' ? 'block' : 'none';
          addBtn.style.display = form.style.display === 'none' ? 'flex' : 'none';
          checkFormValidity(i);
        });
        
        // 输入验证
        const inputs = form.querySelectorAll('input, textarea, select');
        inputs.forEach(input => {
          input.addEventListener('input', function() {
            checkFormValidity(i);
            
            // 省份选择联动
            if (input === provinceSelect) {
              updateCities(i);
            }
            
            // 城市选择联动
            if (input === citySelect) {
              updateDistricts(i);
            }
          });
        });
        
        // 保存地址按钮
        saveBtn.addEventListener('click', function() {
          if (!checkFormValidity(i)) return;
          
          const name = nameInput.value;
          const phone = phoneInput.value;
          const province = provinceSelect.options[provinceSelect.selectedIndex].text;
          const city = citySelect.options[citySelect.selectedIndex].text;
          const district = districtSelect.options[districtSelect.selectedIndex].text;
          const detail = detailInput.value;
          const isDefault = document.getElementById(`default${i}`).checked;
          
          alert(`地址保存成功！\n收件人：${name}\n电话：${phone}\n地址：${province}${city}${district}${detail}`);
          
          // 重置表单
          form.reset();
          form.style.display = 'none';
          addBtn.style.display = 'flex';
          checkFormValidity(i);
          
          // 清空城市和地区选择
          citySelect.innerHTML = '<option value="">请选择城市</option>';
          districtSelect.innerHTML = '<option value="">请选择区/县</option>';
        });
        
        // 返回按钮
        const backBtn = page.querySelector('.header-back');
        backBtn.addEventListener('click', function() {
          alert('返回上一页');
        });
        
        // 管理按钮
        const manageBtn = page.querySelector('.header-btn');
        manageBtn.addEventListener('click', function() {
          alert('进入地址管理模式');
        });
        
        // 编辑地址按钮
        const editBtns = page.querySelectorAll('.address-action-btn.fa-pencil');
        editBtns.forEach(btn => {
          btn.addEventListener('click', function() {
            form.style.display = 'block';
            addBtn.style.display = 'none';
            // 这里可以添加填充表单数据的逻辑
            checkFormValidity(i);
          });
        });
        
        // 删除地址按钮
        const deleteBtns = page.querySelectorAll('.address-action-btn.fa-trash');
        deleteBtns.forEach(btn => {
          btn.addEventListener('click', function() {
            if (confirm('确定要删除这个地址吗？')) {
              this.closest('.address-item').remove();
            }
          });
        });
      }
    }
    
    // 更新城市列表
    function updateCities(pageNum) {
      const provinceSelect = document.getElementById(`province${pageNum}`);
      const citySelect = document.getElementById(`city${pageNum}`);
      const districtSelect = document.getElementById(`district${pageNum}`);
      
      const province = provinceSelect.value;
      citySelect.innerHTML = '<option value="">请选择城市</option>';
      districtSelect.innerHTML = '<option value="">请选择区/县</option>';
      
      if (!province || !areaData[province] || !areaData[province].cities) return;
      
      Object.keys(areaData[province].cities).forEach(cityKey => {
        const city = areaData[province].cities[cityKey];
        const option = document.createElement('option');
        option.value = cityKey;
        option.textContent = city.name;
        citySelect.appendChild(option);
      });
    }
    
    // 更新地区列表
    function updateDistricts(pageNum) {
      const provinceSelect = document.getElementById(`province${pageNum}`);
      const citySelect = document.getElementById(`city${pageNum}`);
      const districtSelect = document.getElementById(`district${pageNum}`);
      
      const province = provinceSelect.value;
      const city = citySelect.value;
      districtSelect.innerHTML = '<option value="">请选择区/县</option>';
      
      if (!province || !city || !areaData[province] || !areaData[province].cities[city]) return;
      
      areaData[province].cities[city].districts.forEach(district => {
        const option = document.createElement('option');
        option.value = district;
        option.textContent = district;
        districtSelect.appendChild(option);
      });
    }
    
    // 检查表单有效性
    function checkFormValidity(pageNum) {
      const name = document.getElementById(`name${pageNum}`).value.trim();
      const phone = document.getElementById(`phone${pageNum}`).value.trim();
      const province = document.getElementById(`province${pageNum}`).value;
      const city = document.getElementById(`city${pageNum}`).value;
      const district = document.getElementById(`district${pageNum}`).value;
      const detail = document.getElementById(`detail${pageNum}`).value.trim();
      const saveBtn = document.getElementById(`saveBtn${pageNum}`);
      
      const isValid = name && phone && phone.length === 11 && province && city && district && detail;
      
      if (isValid) {
        saveBtn.removeAttribute('disabled');
      } else {
        saveBtn.setAttribute('disabled', 'disabled');
      }
      
      return isValid;
    }
    
    // 切换样式选择器显示/隐藏
    function toggleSwitcher() {
      switcher.classList.toggle('hidden');
    }
    
    // 关闭所有页面
    function closeAllPages() {
      Object.values(addressPages).forEach(page => {
        page.classList.remove('active');
      });
    }
    
    // 切换样式
    function switchStyle(style) {
      // 移除所有样式类
      bodyElement.classList.remove('style-1', 'style-2', 'style-3', 'style-4', 'style-5', 'style-6');
      
      // 添加当前样式类
      bodyElement.classList.add(`style-${style}`);
      
      // 更新当前样式
      currentStyle = style;
      
      // 更新切换器选中状态
      switcherOptions.forEach(option => {
        option.classList.remove('active');
        if (parseInt(option.getAttribute('data-style')) === style) {
          option.classList.add('active');
        }
      });
      
      // 重置所有表单
      for (let i = 1; i <= 6; i++) {
        const form = document.getElementById(`addressForm${i}`);
        const addBtn = document.getElementById(`addBtn${i}`);
        form.style.display = 'none';
        addBtn.style.display = 'flex';
        form.reset();
        document.getElementById(`saveBtn${i}`).setAttribute('disabled', 'disabled');
        document.getElementById(`city${i}`).innerHTML = '<option value="">请选择城市</option>';
        document.getElementById(`district${i}`).innerHTML = '<option value="">请选择区/县</option>';
      }
      
      // 显示对应页面
      closeAllPages();
      addressPages[style].classList.add('active');
    }
    
    // 键盘导航
    document.addEventListener('keydown', function(e) {
      if (e.key === 'ArrowLeft') {
        let prev = currentStyle - 1;
        if (prev < 1) prev = 6;
        switchStyle(prev);
      } else if (e.key === 'ArrowRight') {
        let next = currentStyle + 1;
        if (next > 6) next = 1;
        switchStyle(next);
      }
    });
    
    // 启动
    init();
  </script>
</body>
</html>
